//
//  Province.m
//  Utils
//
//  Created by enghou on 2018/4/21.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "Province.h"

@implementation Province
-(instancetype)initWithSource:(NSDictionary *)source{
    self = [super initWithSource:source];
    if (self) {
        self.name = [source objectForKey:@"state"];
        NSArray *cities = [source objectForKey:@"cities"];
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *element in cities) {
            City *city = [[City alloc]initWithSource:element];
            [arr addObject:city];
        }
        self.citys = arr;
    }
    return self;
}
@end
